<?php
/**
 * 系统设置
 * Created by PhpStorm.
 * User: ZengYou
 * Date: 2018/10/13 0013
 * Time: 12:45
 */
namespace app\common\validate;

class System extends BaseValidate
{

    protected $regex = [];

    protected $rule = [
        'a'     => 'require|max:255',
        'b'     => 'require|max:255',
        'c'     => 'require|max:255',
        'd'     => 'require|max:255'
    ];

    protected $message = [
        'a.require'        => 'accessKeyId不能为空',
        'a.max'            => 'accessKeyId长度不能超出255位',
        'b.require'        => 'accessKeySecret不能为空',
        'b.max'            => 'accessKeySecret长度不能超出255位',
        'c.require'        => '签名不能为空',
        'c.max'            => '签名长度不能超出255位',
        'd.require'        => '模版CODE不能为空',
        'd.max'            => '模版CODE长度不能超出255位'
    ];

    /**
     * 添加
     */
    protected function sceneAlibabaEditSave()
    {
        return $this->only([
            'a', 'b', 'c', 'd'
        ]);
    }

}